def strsplit(str):
    str = str[1:-1] #去除括号
    x=str.split(', ') #字符串切片
    for i in range(len(x)):  #将数字转化成int型
        if '0'<=x[i][0]<='9':
            x[i]=int(x[i])
        if x[i]=='add':
            x[i]=int(1)
        if x[i]=='del':
            x[i]=int(-1)
    return x

